import javafx.application.Application;
import javafx.fxml.FXMLLoader;
import javafx.scene.Parent;
import javafx.scene.Scene;
import javafx.scene.image.Image;
import javafx.stage.Stage;

import java.io.FileInputStream;
import java.io.InputStream;

public class Main extends Application {

    @Override
    public void start(Stage primaryStage) throws Exception {
        FXMLLoader loader = new FXMLLoader();
//        FileInputStream fxmlStream = new FileInputStream("/src/checker_board.fxml");
        String path = this.getClass().getClassLoader().getResource("").toURI().getPath().substring(1) + "checker_board.fxml";
        FileInputStream fxmlStream = new FileInputStream(path);

        Parent root = loader.load(fxmlStream);

        primaryStage.setScene(new Scene(root, 500, 660));
        primaryStage.setTitle("中国象棋");
        primaryStage.setResizable(false);
        primaryStage.getIcons().add(new Image("icon.png"));
        primaryStage.show();

    }


    public static void main(String[] args) {
        launch(args);
    }
}
